<?php 
	$data['web_service'] = $this->main_model->get_web_service();
	$all_session = $this->session->all_userdata();
?>

<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">

  <div class="container">
 
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
     
      <a class="navbar-brand" href="<?php echo base_url();?>"> <?php if(@$data['web_service'][0]['web_logo'] != '') { ?><img src="<?php echo base_url();?>img/<?php echo $data['web_service'][0]['web_logo'];?>" height="30px;"/>   <?php } ?> &nbsp;<?php echo @$data['web_service'][0]['web_name']; ?> </a> 
   
      </div>
           
       
      
      
    <div class="navbar-collapse collapse" style="width:100%;">
    
    
   		  <ul class="nav navbar-nav">
            <li style="padding-top:0.6em; margin-left:1em;">
              <?php echo form_open('search/index');?>
      <input class="form-control" name="search" placeholder="Search..." style="width:19em;"/> <?php echo form_close();?>
             </li>      
          </ul>
    	
        
           <?php if(@$all_session['login'] != null ) { ?>
           
            
           
             <ul class="nav navbar-nav navbar-right" >
             
            <li>
      
                    <div class="dropdown" style="margin-top:0.6em;  margin-left:1em;">
                      <a id="dLabel" data-target="#" href="http://example.com" data-toggle="dropdown" aria-haspopup="true" role="button" aria-expanded="false">
                        <font color="#fff"><strong><?php echo @$member[0]['mem_name'];?></strong></font>
                                <?php if(@$all_session['login'] != null) { ?>
                                	<?php if(@$member[0]['mem_image'] != null) { ?>
                                		<img src="<?php echo base_url();?>uploads/<?php echo @$member[0]['mem_image'];?>" height="35px;"/>
                              		<?php } else { ?>
                                		<img data-src="holder.js/35x35">
                                    <?php } ?>
                                <?php } ?>
                      </a>
                    
                      <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                      <?php if(@$all_session['login'][0]['mem_type'] == 2 || @$all_session['login'][0]['mem_type'] == 1 ) { ?>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url();?>index.php/panel">Control Panel</a></li>
                      <?php } ?>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url();?>index.php/timeline">Timeline</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url();?>index.php/profile/index/<?php echo $all_session['login'][0]['mem_id']; ?>">Profile</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url();?>index.php/favorite">Favorite</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url();?>index.php/history">History</a></li>
                        <li><a href="<?php echo base_url();?>index.php/about">About us</a></li>   
                        <li role="presentation" class="divider"></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url();?>index.php/authen/logout">Sing out</a></li>
                      </ul>
                    </div>
            
            </li>   
                
          </ul>
         
            
            
            
          
            <?php } else { ?>
            
                 <ul class="nav navbar-nav navbar-right">
                 <li><a href="<?php echo base_url();?>index.php/timeline">Timeline</a></li>  
                <li><a href="<?php echo base_url();?>index.php/register">Sing up</a></li>   
                <li><a href="<?php echo base_url();?>index.php/authen">Sing in</a></li>   
                 <li><a href="<?php echo base_url();?>index.php/about">About us</a></li>      
                    
              </ul>
        
            <?php } ?> 
            
  
    

      
    </div>
    
    
    <!--  <div class="navbar-collapse collapse"> -->
    
    
	
  </div>
</div>

